package org.seoul.gtugs.client;

import org.seoul.gtugs.client.presenter.DesktopPhotoListPresenter;
import org.seoul.gtugs.client.presenter.MobilePhotoUploadPresenter;
import org.seoul.gtugs.client.presenter.SamplePresenter;
import org.seoul.gtugs.client.ui.FileUploadDisplay;
import org.seoul.gtugs.client.ui.PhotoListDisplay;
import org.seoul.gtugs.client.ui.SampleDisplay;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;


/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Gallery implements EntryPoint {
	/**
	 * The message displayed to the user when the server cannot be reached or
	 * returns an error.
	 */
	private static final String SERVER_ERROR = "An error occurred while "
			+ "attempting to contact the server. Please check your network "
			+ "connection and try again.";

	/**
	 * Create a remote service proxy to talk to the server-side Greeting service.
	 */
	private final GreetingServiceAsync greetingService = GWT
			.create(GreetingService.class);

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		//SampleDisplay display = GWT.create(SampleDisplay.class);
		//SamplePresenter presenter = new SamplePresenter(display);
		
//		FileUploadDisplay display = GWT.create(FileUploadDisplay.class);		
//		MobilePhotoUploadPresenter presenter = new MobilePhotoUploadPresenter(display);
//		presenter.go(RootPanel.get());
		
		PhotoListDisplay display =  GWT.create(PhotoListDisplay.class);
		PhotoUploadServiceAsync rpcService = GWT.create(PhotoUploadService.class);
		DesktopPhotoListPresenter presenter = new DesktopPhotoListPresenter(rpcService, display);
		presenter.go(RootPanel.get());
		
		
		
	}
}
